]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Rename CSS selectors for password prompts
authorStef Walter <stefw@gnome.org>
Thu, 9 Feb 2012 20:52:21 +0000 (21:52 +0100)
committerStef Walter <stefw@gnome.org>
Fri, 10 Feb 2012 08:16:09 +0000 (09:16 +0100)
 * Use .prompt-xxx selectors instead of .polkit-xxx,
   as the selectors are now used by various non-polkit
   dialogs as well

https://bugzilla.gnome.org/show_bug.cgi?id=669776

data/theme/gnome-shell.css
js/ui/networkAgent.js
js/ui/polkitAuthenticationAgent.js
js/ui/wanda.js

index 66699465dda1f78692b34a1cf302b11ea5002aed..6133cfff4624491a4ba3c7cfaaecafc609c962a2 100644 (file)
@@ -1887,55 +1887,41 @@ StTooltip StLabel {
     font-size: 10pt;
 }
 
-/* PolicyKit Authentication Dialog */
-.polkit-dialog {
+/* Password or Authentication Dialog */
+.prompt-dialog {
     /* this is the width of the entire modal popup */
     width: 500px;
 }
 
-.polkit-dialog-main-layout {
+.prompt-dialog-main-layout {
     spacing: 24px;
     padding: 10px;
 }
 
-.polkit-dialog-message-layout {
+.prompt-dialog-message-layout {
     spacing: 16px;
 }
 
-.polkit-dialog-headline {
+.prompt-dialog-headline {
     font-size: 12pt;
     font-weight: bold;
     color: #666666;
 }
 
-.polkit-dialog-description {
+.prompt-dialog-description {
     font-size: 10pt;
     color: white;
 }
 
-.polkit-dialog-user-layout {
-    padding-left: 10px;
-    spacing: 10px;
-}
-
-.polkit-dialog-user-layout:rtl {
-    padding-left: 0px;
-    padding-right: 10px;
-}
-
-.polkit-dialog-user-root-label {
-    color: #ff0000;
-}
-
-.polkit-dialog-password-label:ltr {
+.prompt-dialog-password-label:ltr {
     padding-right: 0.5em;
 }
 
-.polkit-dialog-password-label:rtl {
+.prompt-dialog-password-label:rtl {
     padding-left: 0.5em;
 }
 
-.polkit-dialog-password-entry {
+.prompt-dialog-password-entry {
     background-gradient-start: rgb(236,236,236);
     background-gradient-end: white;
     background-gradient-direction: vertical;
@@ -1945,34 +1931,52 @@ StTooltip StLabel {
     border: 2px solid #555753;
 }
 
-.polkit-dialog-password-entry:focus {
+.prompt-dialog-password-entry:focus {
     border: 2px solid #3465a4;
 }
 
-.polkit-dialog-password-entry .capslock-warning {
+.prompt-dialog-password-entry .capslock-warning {
     icon-size: 16px;
     warning-color: #999;
     padding: 0 4px;
 }
 
-.polkit-dialog-error-label {
+.prompt-dialog-error-label {
     font-size: 10pt;
     color: #ffff00;
     padding-bottom: 8px;
 }
 
-.polkit-dialog-info-label {
+.prompt-dialog-info-label {
     font-size: 10pt;
     padding-bottom: 8px;
 }
 
 /* intentionally left transparent to avoid dialog changing size */
-.polkit-dialog-null-label {
+.prompt-dialog-null-label {
     font-size: 10pt;
     color: rgba(0,0,0,0);
     padding-bottom: 8px;
 }
 
+/* Polkit Dialog */
+
+.polkit-dialog-user-layout {
+    padding-left: 10px;
+    spacing: 10px;
+}
+
+.polkit-dialog-user-layout:rtl {
+    padding-left: 0px;
+    padding-right: 10px;
+}
+
+.polkit-dialog-user-root-label {
+    color: #ff0000;
+}
+
+/* Network Agent Dialog */
+
 .network-dialog-secret-table {
     spacing-rows: 15px;
 }
index 48337dd5e461929467f3bbc52ce77fddc4b0b422..2f8848098383920101a0f170209d7dfbe64ee4b1 100644 (file)
@@ -37,7 +37,7 @@ const NetworkSecretDialog = new Lang.Class({
     Extends: ModalDialog.ModalDialog,
 
     _init: function(agent, requestId, connection, settingName, hints) {
-        this.parent({ styleClass: 'polkit-dialog' });
+        this.parent({ styleClass: 'prompt-dialog' });
 
         this._agent = agent;
         this._requestId = requestId;
@@ -47,7 +47,7 @@ const NetworkSecretDialog = new Lang.Class({
 
         this._content = this._getContent();
 
-        let mainContentBox = new St.BoxLayout({ style_class: 'polkit-dialog-main-layout',
+        let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
                                                 vertical: false });
         this.contentLayout.add(mainContentBox,
                                { x_fill: true,
@@ -60,19 +60,19 @@ const NetworkSecretDialog = new Lang.Class({
                              x_align: St.Align.END,
                              y_align: St.Align.START });
 
-        let messageBox = new St.BoxLayout({ style_class: 'polkit-dialog-message-layout',
+        let messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
                                             vertical: true });
         mainContentBox.add(messageBox,
                            { y_align: St.Align.START });
 
-        let subjectLabel = new St.Label({ style_class: 'polkit-dialog-headline',
+        let subjectLabel = new St.Label({ style_class: 'prompt-dialog-headline',
                                             text: this._content.title });
         messageBox.add(subjectLabel,
                        { y_fill:  false,
                          y_align: St.Align.START });
 
         if (this._content.message != null) {
-            let descriptionLabel = new St.Label({ style_class: 'polkit-dialog-description',
+            let descriptionLabel = new St.Label({ style_class: 'prompt-dialog-description',
                                                   text: this._content.message,
                                                   // HACK: for reasons unknown to me, the label
                                                   // is not asked the correct height for width,
@@ -93,12 +93,12 @@ const NetworkSecretDialog = new Lang.Class({
         let pos = 0;
         for (let i = 0; i < this._content.secrets.length; i++) {
             let secret = this._content.secrets[i];
-            let label = new St.Label({ style_class: 'polkit-dialog-password-label',
+            let label = new St.Label({ style_class: 'prompt-dialog-password-label',
                                        text: secret.label });
 
             let reactive = secret.key != null;
 
-            secret.entry = new St.Entry({ style_class: 'polkit-dialog-password-entry',
+            secret.entry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
                                           text: secret.value, can_focus: reactive,
                                           reactive: reactive });
             ShellEntry.addContextMenu(secret.entry,
index fc9ceacb9dc40997f1dbe4a8b3943ca29ad328ee..6a05e1a0e4f128c6bc78dfd9ead92c32fbbf5262 100644 (file)
@@ -41,7 +41,7 @@ const AuthenticationDialog = new Lang.Class({
     Extends: ModalDialog.ModalDialog,
 
     _init: function(actionId, message, cookie, userNames) {
-        this.parent({ styleClass: 'polkit-dialog' });
+        this.parent({ styleClass: 'prompt-dialog' });
 
         this.actionId = actionId;
         this.message = message;
@@ -49,7 +49,7 @@ const AuthenticationDialog = new Lang.Class({
         this._wasDismissed = false;
         this._completed = false;
 
-        let mainContentBox = new St.BoxLayout({ style_class: 'polkit-dialog-main-layout',
+        let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
                                                 vertical: false });
         this.contentLayout.add(mainContentBox,
                                { x_fill: true,
@@ -62,19 +62,19 @@ const AuthenticationDialog = new Lang.Class({
                              x_align: St.Align.END,
                              y_align: St.Align.START });
 
-        let messageBox = new St.BoxLayout({ style_class: 'polkit-dialog-message-layout',
+        let messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
                                             vertical: true });
         mainContentBox.add(messageBox,
                            { y_align: St.Align.START });
 
-        this._subjectLabel = new St.Label({ style_class: 'polkit-dialog-headline',
+        this._subjectLabel = new St.Label({ style_class: 'prompt-dialog-headline',
                                             text: _("Authentication Required") });
 
         messageBox.add(this._subjectLabel,
                        { y_fill:  false,
                          y_align: St.Align.START });
 
-        this._descriptionLabel = new St.Label({ style_class: 'polkit-dialog-description',
+        this._descriptionLabel = new St.Label({ style_class: 'prompt-dialog-description',
                                                 text: message });
         this._descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
         this._descriptionLabel.clutter_text.line_wrap = true;
@@ -137,9 +137,9 @@ const AuthenticationDialog = new Lang.Class({
 
         this._passwordBox = new St.BoxLayout({ vertical: false });
         messageBox.add(this._passwordBox);
-        this._passwordLabel = new St.Label(({ style_class: 'polkit-dialog-password-label' }));
+        this._passwordLabel = new St.Label(({ style_class: 'prompt-dialog-password-label' }));
         this._passwordBox.add(this._passwordLabel);
-        this._passwordEntry = new St.Entry({ style_class: 'polkit-dialog-password-entry',
+        this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
                                              text: "",
                                              can_focus: true});
         ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
@@ -149,13 +149,13 @@ const AuthenticationDialog = new Lang.Class({
         this.setInitialKeyFocus(this._passwordEntry);
         this._passwordBox.hide();
 
-        this._errorMessageLabel = new St.Label({ style_class: 'polkit-dialog-error-label' });
+        this._errorMessageLabel = new St.Label({ style_class: 'prompt-dialog-error-label' });
         this._errorMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
         this._errorMessageLabel.clutter_text.line_wrap = true;
         messageBox.add(this._errorMessageLabel);
         this._errorMessageLabel.hide();
 
-        this._infoMessageLabel = new St.Label({ style_class: 'polkit-dialog-info-label' });
+        this._infoMessageLabel = new St.Label({ style_class: 'prompt-dialog-info-label' });
         this._infoMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
         this._infoMessageLabel.clutter_text.line_wrap = true;
         messageBox.add(this._infoMessageLabel);
@@ -165,7 +165,7 @@ const AuthenticationDialog = new Lang.Class({
          * infoMessage and errorMessageLabel - but it is still invisible because
          * gnome-shell.css sets the color to be transparent
          */
-        this._nullMessageLabel = new St.Label({ style_class: 'polkit-dialog-null-label',
+        this._nullMessageLabel = new St.Label({ style_class: 'prompt-dialog-null-label',
                                                 text: 'abc'});
         this._nullMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
         this._nullMessageLabel.clutter_text.line_wrap = true;
index 98228aae674a3ab92c3b34ea0fdfbc43f794d2b9..cfbe47eafd229db84800a6fa26456cee91f069ba 100644 (file)
@@ -124,14 +124,14 @@ const FortuneDialog = new Lang.Class({
             text = _("Sorry, no wisdom for you today:\n%s").format(e.message);
         }
 
-        this._title = new St.Label({ style_class: 'polkit-dialog-headline',
+        this._title = new St.Label({ style_class: 'prompt-dialog-headline',
                                      text: _("%s the Oracle says").format(name) });
-        this._label = new St.Label({ style_class: 'polkit-dialog-description',
+        this._label = new St.Label({ style_class: 'prompt-dialog-description',
                                      text: text });
         this._label.clutter_text.line_wrap = true;
 
         this._box = new St.BoxLayout({ vertical: true,
-                                       style_class: 'polkit-dialog' // this is just to force a reasonable width
+                                       style_class: 'prompt-dialog' // this is just to force a reasonable width
                                      });
         this._box.add(this._title, { align: St.Align.MIDDLE });
         this._box.add(this._label, { expand: true });